package com.ztjy.market.dao;

import com.ztjy.bean.Orderdetails;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface OrderdetailsDao {
    /**
     * 查询所有订单详情
     * @param orderdetails
     * @return
     */
    List<Orderdetails> findAll(Orderdetails orderdetails);

    /**
     * 根据detailsId查询一个订单详情对象
     * @param detailsId
     * @return
     */
    Orderdetails findOrderdetailsById(Integer detailsId);

    /**
     * 添加
     * @param orderdetails
     * @return
     */
    boolean addOrderdetails(Orderdetails orderdetails);

    /**
     * 修改
     * @param orderdetails
     * @return
     */
    boolean updateOrderdetails(Orderdetails orderdetails);

    /**
     * 根据detailsId删除
     * @param detailsId
     * @return
     */
    boolean delOrderdetails(Integer detailsId);

    /**
     * 根据 订单编号删除
     * @param orderid
     * @return
     */
    boolean delDetailsOrdersId(String orderid);

    /**
     * 根据 订单编号 查询订单详情
     * @param orderid
     * @return
     */
    List<Orderdetails> findByOrderId(String orderid);
}